<template>
    <div v-if="show">
      <n-empty :description="desc">
        <template #extra>
          <n-button size="large" @click="handleOpen">
            <n-icon>
              <StorefrontOutline/>
            </n-icon>
            <span class="px-2">{{ btnmsg }}</span>
          </n-button>
        </template>
      </n-empty>
    </div>
  </template>
  <script setup>
     const props = defineProps({
        show:{
            type:Boolean,
            default:false
        },
        desc:{
            type:String,
            default:"你什么也找不到"
        },
        btnmsg:{
            type:String,
            default:"看看别的"
        },
        url:{
            type:String,
            default:"/"
        },
      })
  
      const handleOpen = ()=>{
        navigateTo(props.url || "/")
      }
  </script>